<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>小萌神订餐网</title>
    <!-- 图标 -->
    <link rel="short icon" href="image/eat0.ico"/>
    <link rel="stylesheet" href="css/index.css"/>
	<script src="js/vue.js"></script>
</head>
<body>

<div id="app">

   <iframe height="740" src="https://ac.yunyoujun.cn"></iframe>
</div>

<!--  在网页里面引入javascript    jquery:DOM   大家注意顺序  -->
<script src="js/jquery-1.9.1.js"></script>

<script src="js/axios.js"></script>
<script type="text/javascript">
    console.info("Hello");
    let vm = new Vue({
        el: "#app",
        data: {
            orderflag: false,     //送货地址div
            loginflag: false,
            foods: [],
        },
        method: function () {
            //console.info("Hello");

            axios.all([checkLogin(), getAllFood()])
                .then(axios.spread(function (d1, d2) {
                    // 两个请求现在都执行完成
                    if (d1.data.close === 1){
                        this.loginflag = true;
                    }

                }));

        }

    });

    function checkLogin() {
        return axios.get('/user/12345');
    }

    function getAllFood() {
        return axios.get('/user/12345/permissions');
    }

</script>

</body>
</html>